import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_base_widget/main.dart';

void main() {
  testWidgets('Counter increments smoke test', (WidgetTester tester) async {

    var objectList = [100, "测试", 200, "张三", 3000];
    //筛选数据
    var ints = objectList.where((e) => e is int).toList();

    ///输出一下   ints 的类型
    /// List<Object>
    debugPrint("${ints.runtimeType}");

    //List<int>
    var ints2 = objectList.where((e) => e is int).cast<int>().toList();
    //输出一下类型
    debugPrint("${ints2.runtimeType}");

    var ints3 = objectList.whereType<int>().toList();
    //输出一下类型 List<int>
    debugPrint("${ints3.runtimeType}");
  });
}
